"""
The ArithmeticMathProblem class, a child of Problem,
defines question to be an equation of two operands and one operator
and answer to be a simple numeral.

Operators: 0-2 representing addition, subtraction, and multiplication, respectively
Rohit Majumdar
rohitmaj@usc.edu
"""

# Imports
from Problem import *
from random import *

class ArithmeticMathProblem(Problem):

	def __init__(self, operator, min, max):
		firstOperand = randint(min, max)
		secondOperand = randint(min, max)
		if operator == 0:
			self.answer = firstOperand + secondOperand
			self.question = str(firstOperand) + " + " + str(secondOperand) + " = " 
		if operator == 1:
			self.answer = firstOperand - secondOperand
			self.question = str(firstOperand) + " - " + str(secondOperand) + " = " 
		if operator == 2:
			self.answer = firstOperand * secondOperand
			self.question = str(firstOperand) + " * " + str(secondOperand) + " = " 
		

